<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<div class="t_bar">
	<span class="color_red">*</span>产学研合作项目基本情况
</div>
<table id="budgetFunds"  border="0" cellspacing="0" cellpadding="0" class="table01" >
<tr>
<td width="14%" align="right">申请资助金额：
  <td width="86%" ><x:out select="$xmlData/data/proposal/budget_funds" />万元
</td>
</tr>
</table>
	<table id="zh_projects" border="0" cellspacing="0" cellpadding="0" class="table01" >
		<thead>
			<tr>
                <th width="5%" nowrap>序号</th>
				<th width="25%">具体项目名称</th>
				<th width="20%">合作单位名称</th>
				<th width="10%">合作形式</th>
				<th width="10%">合作协议签订时间</th>
				<th width="15%">项目资金投入金额（万元）</th>
				<th width="15%" nowrap>实际支付合作方金额（万元）</th>
			</tr>
		</thead>
		<tbody id="tab">
			<c:set value="0" var="index" scope="page" />
			<x:forEach select="$xmlData/data/zh_projects/zh_project" var="zh_project">
				<c:choose>
					<c:when test="${index<10}">
						<c:set value="0" var="flag" scope="page" />
					</c:when>
					<c:otherwise>
						<c:set value="" var="flag" scope="page" />
					</c:otherwise>
				</c:choose>
				<tr>
					<td align="center">
					    <input type="radio" name="sel_projects" style="display:none"/> 
					    <input type="hidden" name='zh_projects/zh_project[${flag}${index}]/prp_imple' value="<x:out select="$zh_project/prp_imple"/>"/>
						<input type="hidden" name='zh_projects/zh_project[${flag}${index}]/prp_ebenefit' value="<x:out select="$zh_project/prp_ebenefit"/>"/>
						<input type="hidden" name='zh_projects/zh_project[${flag}${index}]/prp_sbenefit' value="<x:out select="$zh_project/prp_sbenefit"/>"/>
					    <span name="zh_projects/zh_project[${flag}${index}]@seq_no">${index+1}</span>
					</td>
					<td>
					    <span name="zh_projects/zh_project[${flag}${index}]/plan_name"><a href="#" class="yase" onclick="MyInfoView(this,'zh_projects','prpInfoEdit_cxyhz')"><x:out select="$zh_project/plan_name" /></a></span>
					</td>
					<td>
					    <span name="zh_projects/zh_project[${flag}${index}]/prp_name"><x:out select="$zh_project/prp_name" /></span>
					</td>
					<td align="center">
					    <span name="zh_projects/zh_project[${flag}${index}]/dept"><x:out select="$zh_project/dept" /></span>
					</td>
					<td align="center">	
					    <span name="zh_projects/zh_project[${flag}${index}]/year"><x:out select="$zh_project/year" /></span>
					</td>
					<td align="right">
					    <span name="zh_projects/zh_project[${flag}${index}]/amt"><x:out select="$zh_project/amt" /></span>
					</td>
					<td align="right" width="15%">					
					    <span name="zh_projects/zh_project[${flag}${index}]/actually_amt"><x:out select="$zh_project/actually_amt" /></span>
				    </td>
				</tr>
				<c:set value="${index+1}" var="index" scope="page" />
			</x:forEach>
			    <tr>
                    <td  colspan="6" style="text-align:right;" width="85%">合计</td>
                    <td style="text-align:right;" width="15%">					
					    <x:out select="$xmlData/data/zh_projects_total/actually_amt" />
				    </td>
			    </tr>
			</tbody>
	</table>
	<br>
	<script type="text/javascript">
	    $(function() {
	    	displayTotal('zh_projects','zh_projects_total');
	    });
	    function displayTotal(tabel1,tabel2){
	    	var len = $("#"+tabel1+" tr").length-2;
	    	if(len>=1){
	    		$("#"+tabel2).attr("style","display: ''");
	    	}else{
	    		$("#"+tabel2).attr("style","display: none");
	    	}
	    }
    </script>
